﻿<!DOCTYPE html>
<html>
    <head>
        <title>
            @(ViewBag.Title ?? ViewBag.Section)
            - MediaLibrary
        </title>
        <link href="@Url.Content("~/Design/Styles/Common.css")" rel="stylesheet" type="text/css" />
        <link href="@Url.Content("~/Design/Styles/Design.css")" rel="stylesheet" type="text/css" />
        <script src="@Url.Content("~/Design/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Design/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Design/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    </head>
    <body>
        <div class="all">
            <div class="header">
                <div class="top">
                    <div class="left">
                        <h1>MediaLibrary @Html.Action("versioninfo", "common")</h1>
                    </div>
                    <div class="right">
                        @if (!Request.IsAuthenticated)
                        {
                            @Html.ActionLink("Login", "login", "account");
                        }
                        else
                        {
                            @Html.Action("UserInfo", "Account");
                        }
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
            <div class="body">
                <div class="section">
                    <h2>@ViewBag.Section</h2>
                    
                    <div class="tabs">
                        @UI.Tabs()
                        <div class="clear"></div>
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="content">
                    @if (Message != null)
                    {
                        <div class="message-folder">
                            @UI.Message(Message)
                        </div>
                    }

                    @if (IsSectionDefined("ActionPanel")) { 
                        <div class="action-panel">
                            @RenderSection("ActionPanel")
                        </div>
                    }

                    @RenderBody()
                </div>
                @if (IsSectionDefined("Paging")) { 
                    <div class="paging">
                        @RenderSection("Paging")
                    </div>
                }
            </div>
            <div class="foot">
                
            </div>
        </div>

        <script type="text/javascript">

            $(function () {
                $('form').submit(function () {
                    $(this).find('input[type=submit]').attr('disabled', 'disabled');
                    window.setTimeout("EnableButtons();", 1000);
                });
            });

            function EnableButtons() {
                $('form').find('input[type=submit]').removeAttr('disabled');
            }
        
        </script>
    </body>
</html>
